<template>
    <div class="platform-page page">
        <div class="content">
            <PlatformCrumb back="培训详情"></PlatformCrumb>
            <!-- 富文本区域 -->
            <div class="training-content">
                <div class="training-content-header" style="border-bottom:0;">
                    <span>{{detail.name}}</span>
                </div>
                <div class="training-content-text">
                    <div class="coursedetails" v-html="detail.doc">
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
    import PlatformCrumb from "@/components/PlatformCrumb.vue";
    import {getCourseGet} from '../../api/api/platform.js';
    import {baseImgPath, basefile} from '@/config/env.js';

    export default {
        components: {
            PlatformCrumb
        },
        created() {
            this.getCourseGet()
        },
        data() {
            return {
                id: this.$route.query.id ? this.$route.query.id : 0,
                data: {
                    id: this.$route.query.id ? this.$route.query.id : 0,
                },
                detail: {
                    address: '',
                    banner: '',
                    coachId: '',
                    courseType: 1,
                    createTime: 0,
                    doc: "",
                    imgs: "",
                    mechanismId: '',
                    money: 0,
                    name: "",
                    plan: '',
                    status: 0,
                    type: 2,
                    updateTime: '',
                    userId: 1,
                }

            };
        },
        methods: {
            handleClick(row) {
                console.log(row);
            },
            handleSizeChange(val) {
                console.log(`每页 ${val} 条`);
            },
            handleCurrentChange(val) {
                console.log(`当前页: ${val}`);
            },
            goView(e) {
                console.log(e);
            },
            getCourseGet() {
                getCourseGet(this.data).then(res => {
                    this.detail = res.data
                });
            },
            showDelete(e) {
                this.isdelete = true
                this.deletedata = this.list[e]
            },
        },

        filters: {
            filtersImg: function (img) {
                return basefile + img
            },
        }
    };
</script>

<style lang="less" scoped>
    @import url("platform.less");

    .operation {
        margin-right: 25px;
    }
</style>
